From b1badf17e3bbe136721a58182256d9160d9a5fd8 Mon Sep 17 00:00:00 2001 From: Debian LibreOffice Maintainers Date: Wed, 28 Jan 2026 21:03:25 +0100 Subject: [PATCH] skia-gcc-no-musttail Gbp-Pq: Name skia-gcc-no-musttail.diff --- external/skia/UnpackedTarball_skia.mk | 1 + external/skia/gcc-no-musttail.diff | 33 +++++++++++++++++++++++++++ 2 files changed, 34 insertions(+) create mode 100644 external/skia/gcc-no-musttail.diff diff --git a/external/skia/UnpackedTarball_skia.mk b/external/skia/UnpackedTarball_skia.mk index 692eba0130e..2552ef7f36f 100644 --- a/external/skia/UnpackedTarball_skia.mk +++ b/external/skia/UnpackedTarball_skia.mk @@ -44,6 +44,7 @@ skia_patches := \ 0004-loong64-Fix-the-remaining-implicit-vector-casts.patch \ msvc-unknown-attributes.patch.1 \ fix-semaphore-include.patch.1 \ + gcc-no-musttail.diff \ ifneq ($(MSYSTEM),) # use binary flag so patch from git-bash won't choke on mixed line-endings in patches diff --git a/external/skia/gcc-no-musttail.diff b/external/skia/gcc-no-musttail.diff new file mode 100644 index 00000000000..c08c6b669ca --- /dev/null +++ b/external/skia/gcc-no-musttail.diff @@ -0,0 +1,33 @@ +diff -urN skia-old/modules/skcms/src/skcms_internals.h skia/modules/skcms/src/skcms_internals.h +--- skia-old/modules/skcms/src/skcms_internals.h 2025-11-13 07:45:02.000000000 +0100 ++++ skia/modules/skcms/src/skcms_internals.h 2025-11-30 12:05:23.846221957 +0100 +@@ -53,13 +53,16 @@ + && !defined(__riscv) \ + && !defined(__powerpc__) \ + && !defined(__loongarch__) \ ++ && !defined(__alpha__) \ + && !defined(_WIN32) && !defined(__SYMBIAN32__) + #define SKCMS_HAS_MUSTTAIL 1 + #endif + #elif defined(__GNUC__) && !defined(SKCMS_HAS_MUSTTAIL) + // GCC on riscv64 does not support our tail call functions + // cf. https://gcc.gnu.org/bugzilla/show_bug.cgi?id=121784 +- #if __has_cpp_attribute(clang::musttail) && !defined(__riscv) ++ // copy the rest over from the clang case, just in case we ever built with ++ // gcc for them (which we do for alpha right now) ++ #if __has_cpp_attribute(clang::musttail) && !defined(__arm__) && !defined(__riscv) && !defined (__powerpc__) && !defined(__loongarch__) && !defined (__alpha__) + #define SKCMS_HAS_MUSTTAIL 1 + #else + #define SKCMS_HAS_MUSTTAIL 0 +diff -Nru skia-old/src/core/SkRasterPipeline.h skia/src/core/SkRasterPipeline.h +--- skia-old/src/core/SkRasterPipeline.h 2025-11-13 07:45:03.000000000 +0100 ++++ skia/src/core/SkRasterPipeline.h 2025-12-08 17:01:58.882479397 +0100 +@@ -27,7 +27,7 @@ + struct skcms_TransferFunction; + + #if __has_cpp_attribute(clang::musttail) && !defined(__EMSCRIPTEN__) && !defined(SK_CPU_ARM32) && \ +- !defined(SK_CPU_LOONGARCH) && !defined(SK_CPU_PPC) && \ ++ !defined(SK_CPU_LOONGARCH) && !defined(SK_CPU_PPC) && !defined(__alpha__) && \ + !(defined(_WIN32) && defined(SK_BUILD_FOR_ANDROID_FRAMEWORK)) + // [[clang::musttail]] is disabled for the Android version of Skia running on Windows as it + // causes crashes (This is probably related to http://crbug.com/1505442). -- 2.30.2